import Vue from 'vue'
import Router from 'vue-router'
import Login from "../components/login/Login";
import ChangePwd from "../components/top/ChangePwd";
import Main from "../components/main/Main";

import Admin from "../components/main/Admin";
import AcademyMGMT from "../components/admin/AcademyMGMT";
import AcademyAdd from "../components/admin/AcademyAdd";
import AcademyModify from "../components/admin/AcademyModify";
import ClazzMGMT from "../components/admin/ClazzMGMT";
import CourseMGMT from "../components/admin/CourseMGMT";
import ProfessionMGMT from "../components/admin/ProfessionMGMT";
import StudentMGMT from "../components/admin/StudentMGMT";
import TermMGMT from "../components/admin/TermMGMT";
import TeacherMGMT from "../components/admin/TeacherMGMT";
import TeachTaskMGMT from "../components/admin/TeachTaskMGMT";
import TeachTaskAdd from "../components/admin/TeachTaskAdd";
import ApproveExamine from "../components/admin/ApproveExamine";
import AGradeQuery from "../components/admin/AGradeQuery";
import AdminMGMT from "../components/admin/AdminMGMT";

import Teacher from "../components/main/Teacher";
import TeachTaskForTeacher from "../components/teacher/TeachTaskForTeacher";
import UploadGrades from "../components/teacher/UploadGrades";
import SubProjectMGMT from "../components/teacher/SubProjectMGMT";
import SubScoreMGMT from "../components/teacher/SubScoreMGMT";
import AppealHandle from "../components/teacher/AppealHandle";
import TGradeQuery from "../components/teacher/TGradeQuery";
import TScoreQuery from "../components/teacher/TScoreQuery";

import Student from "../components/main/Student";
import StuGrade from "../components/student/StuGrade";
import GradeStatistics from "../components/student/GradeStatistics";

Vue.use(Router)
//创建路由对象
const router = new Router({
    routes: [
        {
            path: '/',
            component: Login
        },
        {
            path: '/admin',
            component: Admin,
            children:[
                {
                    path: 'changePwd',
                    component: ChangePwd
                },
                {
                    path: 'academyMGMT',
                    component: AcademyMGMT
                },
                {
                    path: 'academyAdd',
                    component: AcademyAdd
                },
                {
                    path: 'academyModify/:academyId',
                    component: AcademyModify
                },
                {
                    path: 'termMGMT',
                    component: TermMGMT
                },
                {
                    path: 'professionMGMT',
                    component: ProfessionMGMT
                },
                {
                    path: 'clazzMGMT',
                    component: ClazzMGMT
                },
                {
                    path: 'courseMGMT',
                    component: CourseMGMT
                },
                {
                    path: 'teacherMGMT',
                    component: TeacherMGMT
                },
                {
                    path: 'studentMGMT',
                    component: StudentMGMT
                },
                {
                    path: 'teachTaskMGMT',
                    component: TeachTaskMGMT
                },
                {
                    path: 'teachTaskAdd',
                    component: TeachTaskAdd
                },
                {
                    path: 'teachTaskModify/:teachId',
                    component: TeachTaskAdd
                },
                {
                    path: 'approveExamine',
                    component: ApproveExamine
                },
                {
                    path: 'gradeQuery',
                    component: AGradeQuery
                },
                {
                    path: 'scoreQuery/:teachId',
                    component: TScoreQuery
                },
                {
                    path: 'main',
                    component: Main
                },
                {
                    path: 'adminMGMT',
                    component: AdminMGMT
                },
            ]
        },
        {
            path: '/teacher',
            component: Teacher,
            children:[
                {
                    path: 'changePwd',
                    component: ChangePwd
                },
                {
                    path: 'teachTaskMGMT',
                    component: TeachTaskForTeacher
                },
                {
                    path: 'uploadGrades/:teachId',
                    component: UploadGrades
                },
                {
                    path: 'subProjectMGMT/:teachId',
                    component: SubProjectMGMT
                },
                {
                    path: 'subScoreMGMT/:subProjectId',
                    component: SubScoreMGMT
                },
                {
                    path: 'appealHandle',
                    component: AppealHandle
                },
                {
                    path: 'gradeQuery',
                    component: TGradeQuery
                },
                {
                    path: 'scoreQuery/:teachId',
                    component: TScoreQuery
                },
                {
                    path: 'main',
                    component: Main
                },
            ]
        },
        {
            path: '/student',
            component: Student,
            children:[
                {
                    path: 'changePwd',
                    component: ChangePwd
                },
                {
                    path: 'myGrades',
                    component: StuGrade
                },
                {
                    path: 'main',
                    component: Main
                },
                {
                    path: 'gradeStatistics',
                    component: GradeStatistics
                },
            ]
        }
    ]
})

export default router